package root.agent.demo.invoke;

import dev.langchain4j.community.model.dashscope.QwenChatModel;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

public class LangChain4jInvoke implements CommandLineRunner {
    @Override
    public void run(String... args) throws Exception {
        QwenChatModel chatModel = QwenChatModel
                .builder()
                .apiKey(Constant.API_KEY)
                .modelName("qwen-plus")
                .maxTokens(1000).build();
        String chat = chatModel.chat("你好，我是黎兵兵，帮我规划一下明天吃啥");
        System.out.println(chat);
    }
}
